package com.zpark.transaction.service.convert;

import com.zpark.transaction.api.dto.OrderResultDTO;
import com.zpark.transaction.api.dto.PayChannelDTO;
import com.zpark.transaction.service.entity.PayChannel;
import com.zpark.transaction.service.entity.PayOrder;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @PackageName: com.zpark.transaction.service.convert
 * @ClassName: IOrderResultConvert
 * @Description:
 * @author: RZS
 * @date: 2024/5/21  11:15
 */
@Mapper
public interface IPayChannelConvert {
    // 获取当前对象的实例
    IPayChannelConvert INSTANCE = Mappers.getMapper(IPayChannelConvert.class);

    // dto转entity
    PayChannel dtoToEntity(PayChannelDTO dto);

    // entity转dto
    PayChannelDTO entityToDto(PayChannel payOrder);

    // list的dto转list的entity
    List<PayChannel> listDtoToListEntity(List<PayChannelDTO> dtos);

    // list的entity转list的dto
    List<PayChannelDTO> listEntityToListDto(List<PayChannel> payOrders);
}
